package com.hbnu.service;

import com.hbnu.dao.OrderDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class OrderService {
    @Autowired  //@Resource(name = "orderDao") 数据层orderDao添加对象注入业务层对象orderService中
    private OrderDao orderDao;
    @Value("A001")
    public String orderNo;
    @Value("小米，苹果，华为")
    public String[] orderPro;
    public void addOrder(){
        System.out.println("业务层添加订单");
        orderDao.addOrder();
    }
}
